######################################################################
# Bit serial absolute value ModelSim do file
# Stephen West, James Carroll
# BYU ECEn 620, Fall 2008
######################################################################
quit -sim

vcom BitSerialAbs.vhd
vcom Delay_N.vhd
vsim BitSerialAbs
add wave clk
add wave -color goldenrod lsb_in
add wave -color "steel blue" bits_in
add wave -color "Indian Red" inv
add wave -color red negate
add wave -color blue positrate
add wave is_pos
add wave -color orange lsb_delay
add wave -color coral lsb_delay2
add wave -color salmon lsb_out
add wave -color "cadet blue" abs_out

force clk 1,0 10ns -r 20ns

#+1
force lsb_in 1,0 20ns
force bits_in 1,0 20ns 
run 20ns
run 20ns
run 20ns
run 20ns
run 20ns
run 20ns
run 20ns
run 20ns
run 20ns
run 20ns
run 20ns
run 20ns


#-1
force lsb_in 1,0 20ns
force bits_in 1
run 20ns
run 20ns
run 20ns
run 20ns
run 20ns
run 20ns
run 20ns
run 20ns
run 20ns
run 20ns
run 20ns
run 20ns

force lsb_in 1,0 20ns
force bits_in 0,1 220ns
run 240ns

force lsb_in 1,0 20ns
force bits_in 0 
run 240ns
